package com.wang.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Classname CommonResult
 * @Description TODO
 * @Date 2024/2/20 10:47
 * @Created by pc
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {
    private Integer code; // 状态码
    private String message; // 消息提示
    private T data; //泛型，对应类型的json数据

    // 手工定义带两个参数的构造方法
    public CommonResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
